package com.bix.util.blizfiles.m2;

import java.nio.ByteBuffer;

public class M2StandardAnimation {
	private	short							interpolationType;
	private	short							globalSequenceId;
	private	M2CountOffsetPair	interpolationRanges = new M2CountOffsetPair ();
	private	M2CountOffsetPair	timestamps = new M2CountOffsetPair ();
	private	M2CountOffsetPair	values = new M2CountOffsetPair ();
	
	public M2StandardAnimation () {
	}
	
	public M2StandardAnimation (ByteBuffer bb) {
		read (bb);
	}
	
	/**
	 * Reads the 28 bytes that describe a standard animation.
	 * 
	 * @param bb
	 */
	public void read (ByteBuffer bb) {
		this.interpolationType = bb.getShort();
		this.globalSequenceId = bb.getShort();
		this.interpolationRanges.read(bb);
		this.timestamps.read(bb);
		this.values.read(bb);
	}

	/**
	 * @return the interpolationType
	 */
	public short getInterpolationType() {
		return interpolationType;
	}

	/**
	 * @return the globalSequenceId
	 */
	public short getGlobalSequenceId() {
		return globalSequenceId;
	}

	/**
	 * @return the interpolationRanges
	 */
	public M2CountOffsetPair getInterpolationRanges() {
		return interpolationRanges;
	}

	/**
	 * @return the timestamps
	 */
	public M2CountOffsetPair getTimestamps() {
		return timestamps;
	}

	/**
	 * @return the values
	 */
	public M2CountOffsetPair getValues() {
		return values;
	}
}
